package com.junyidao.game.service;

import com.junyidao.game.mapper.PLoginLogMapper;
import com.junyidao.game.pojo.PLoginLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by zzh on 2016/8/16.
 */
@Service
@Transactional
public class LoginLogService {

    @Autowired
    private PLoginLogMapper loginLogMapper;

    @Autowired
    private SequenceService sequenceService;

    public void addLoginLog(PLoginLog log) {
        Integer id = sequenceService.getNextSequence("OPER_LOG_ID");
        log.setLogId(id);
        loginLogMapper.insert(log);
    }
}
